local skill = fk.CreateSkill{
  name = "action__dashi_skill",
}

Fk:loadTranslationTable{
  ["action__dashi"] = "大师",
  ["action__dashi_skill"] = "大师",
  [":action__dashi"] = "锦囊牌<br /><b>时机</b>：出牌阶段<br /><b>目标</b>：你 <br /><b>效果</b>：令两名其他角色交换手牌。（不可响应）",
  ["#action__dashi_skill"] = "令两名其他角色交换手牌",

}


skill:addEffect("cardskill", {
  mute = true,
  name = "action__dashi",
  prompt = "#action__dashi_skill",
  mod_target_filter = Util.TrueFunc,
  can_use = function(self, player, card)
    return not player:isProhibited(player, card) and #Fk:currentRoom().alive_players > 2
  end,
  on_use = function(self, room, cardUseEvent)
    cardUseEvent.disresponsiveList = table.simpleClone(Fk:currentRoom().players)
    if not cardUseEvent.tos or #cardUseEvent.tos == 0 then
      cardUseEvent.tos = { cardUseEvent.from }
    end
  end,
  on_effect = function(self, room, effect)
    local to = room:askToChoosePlayers(effect.to, {
      min_num = 2,
      max_num = 2,
      targets = room:getOtherPlayers(effect.to),
      skill_name = self.name,
      cancelable = false,
      prompt = "选择两名其他角色，令他们交换手牌",
    })
    if #to > 1 then
      room:swapAllCards(effect.to, {to[1],to[2]}, self.name)
    end
  end,
})


return skill